package com.yicong.ants.scenic

import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import com.cchao.simplelib.ui.activity.BaseTitleBarActivity
import com.yicong.ants.R
import com.yicong.ants.databinding.ActivityScenicMainBinding
import com.yicong.ants.utils.StatusBarUtil


class ScenicMainActivity : BaseTitleBarActivity<ActivityScenicMainBinding>() {
    private lateinit var navController: NavController


    override fun getLayout(): Int {
        return R.layout.activity_scenic_main;
    }

    override fun initEventAndData() {
        StatusBarUtil.setStatusBarTransparent(this)
        setTitleBarVisible(false)
        val navHostFragment =
            supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
        navController = navHostFragment.navController
    }

    override fun onLoadData() {

    }

    override fun onSupportNavigateUp(): Boolean {
        return navController.navigateUp() || super.onSupportNavigateUp()
    }

}